//
//  NetUtils.h
//  PhnixHome
//
//  Created by Levy Xu on 2017/12/22.
//  Copyright © 2017年 Levy Xu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CommonResult.h"
#import "PHUserInfo.h"

#define kBaseURL @"http://120.25.67.136:8080/cloudservice/api/app/"

typedef enum : NSUInteger {
    PHAccountTypeUnknown,
    PHAccountTypePhone,
    PHAccountTypeEmail,
    PHAccountTypeWechat
} PHAccountType;

@interface NetUtils : NSObject

+(AFHTTPSessionManager *)HTTPManager;
+(AFHTTPSessionManager *)JSONManager;

+(PHAccountType)typeWithName:(NSString *)username;

+(void)loginWithType:(PHAccountType)type name:(NSString *)name password:(NSString *)password finish:(FinishBlock)finish;

+(void)registerWithType:(PHAccountType)type name:(NSString *)name code:(NSString *)code third_id:(NSString *)third_id password:(NSString *)password;

+(void)findPasswordWithType:(PHAccountType)type name:(NSString *)name code:(NSString *)code password:(NSString *)password;

+(void)checkThirdType:(PHAccountType)type third_id:(NSString *)third_id finish:(FinishBlock)finish;

@end
